package com.phifan.book_zdmm;

import java.util.Timer;

import java.util.TimerTask;

import com.phifan.book_zdmm.R;
import com.util.zdmm.ScreenManager;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.WindowManager;

public class Start extends Activity {
	
	static {
		//				应用Id				应用密码			      广告请求间隔(s)   测试模式      
//		AdManager.init("adede3c583718547", "c028b67b000624e0", 30, 			false);
	}
	private static final String TEMP = "temp";
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.start);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,   
                WindowManager.LayoutParams.FLAG_FULLSCREEN); 
        
        ScreenManager.init(this);
        
        Timer timer = new Timer();
        TimerTask tt = new TimerTask(){

			@Override
			public void run() {				
					Intent intent = new Intent();
					intent.setClass(Start.this, MainActivity.class);
					startActivity(intent);
					Start.this.finish();
			}        	
        };
        timer.schedule(tt, 1800);
    }
    
    @Override
    //键盘点击触发事件 做出判断   有待添加 逻辑  暂时不用
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK
                && event.getRepeatCount() == 0) {        	
            return true;
        }
        return super.onKeyDown(keyCode, event);
     }
  
}